package io.dy.service;

import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.concurrent.ThreadPoolExecutor;

/**
 * @author dmj
 * @date 2024年04月18日 上午11:52
 */
@Service
@RequiredArgsConstructor
public class TaskRunServiceImpl {

    private final ThreadPoolExecutor reportThreadPoolExecutor;


    public void runThread(){
        while (true){
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            reportThreadPoolExecutor.execute(()->{});
        }

    }
}
